package com.osgix.authorize.dao.impl;

import org.springframework.stereotype.Repository;

import com.osgix.authorize.dao.RolePrivilegeDao;
import com.osgix.authorize.model.RolePrivilege;
import com.osgix.common.orm.ibatis.BaseIbatisDao;

@Repository("rolePrivilegeDao")
public class RolePrivilegeDaoImpl extends BaseIbatisDao<RolePrivilege, Long> implements RolePrivilegeDao {

	@Override
	public String getIbatisMapperNamesapce() {
		return "RolePrivilege";
	}

	public void saveOrUpdate(RolePrivilege rolePrivilege) {
		if (rolePrivilege.getRolePrivilegeId() == null)
			save(rolePrivilege);
		else
			update(rolePrivilege);
	}

}
